# 1
# next,pre

# 2
# nonono,任何函数都有返回值,哪怕是None

# 3
# 不可以

# 4
# 打印520

# 5 baby i love you
# 检查是否回文联
def palin(string):
    length = len(string)
    last = length - 1
    length //= 2
    flag = 1
    for each in range(length):
        if string[each] != string[last]:
            flag = 0
        last -= 1
    if flag == 1:
        return 1
    else:
        return 0


# string = input('请输入一个话')
#
# if palin(string) == 1:
#     print('是回文联')
# else:
#     print('不是回文联')

# 检查数字 字母 空格数量

def count(*param):
    length = len(param)
    for i in range(length):
        letter = 0
        space = 0
        digit = 0
        other = 0

        for each in param[i]:
            each = str(each)
            if each.isalpha():
                # 字母
                letter += 1
            elif each.isdigit():
                # 数字
                digit += 1
            elif each == ' ':
                # 空格
                space += 1
            else:
                other += 1
        print('第%d个字符串共有:英文%d个,数字%d个,空格%d个,其他%d个' %
                  (i+1,letter,digit,space,other))

count('hhodefejo发饿哦减肥——————    恩恩h','纷纷 133')

